extension PathExtension on String {
  bool isImagePath(String path) {
    final imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.bmp', '.webp'];
    return imageExtensions.any((ext) => path.toLowerCase().endsWith(ext));
  }

  bool isVideoPath(String path) {
    final videoExtensions = [
      '.mp4',
      '.mov',
      '.avi',
      '.mkv',
      '.flv',
      '.wmv',
      '.rmvb',
      '.webm',
      '.3gp',
    ];
    return videoExtensions.any((ext) => path.toLowerCase().endsWith(ext));
  }
}
